#include<stdio.h>
int missingNumber(int* nums, int numsSize)
{
	int sum1=0;
	int sum2=0;
	for(int i=0;i<=numsSize;i++)
	{
		sum1+=i;
		if(i!=numsSize)
		{
			sum2+=nums[i];
		}
	}
	return sum1-sum2;
}
int main()
{
	int arr[9]={0,1,2,3,4,5,6,7,9};
	printf("%d",missingNumber(arr,9));
	return 0;
}
